{{ $isProjectHome := eq (path.Dir .File.Dir) "projects" }}

{{ if $isProjectHome }}
	{{ .Render "list" }}
{{ else }}
	{{ $link := "" }}
	{{ if isset .Params "link" }}
		{{ if hasPrefix .Params.link "/" }}
			{{ $link = path.Join .RelPermalink .Params.link }}
		{{ else }}
			{{ $link = .Params.link }}
		{{ end }}
	{{ else }}
		{{ $link = path.Join .RelPermalink "/overview" }}
	{{ end }}
	<head>
		<meta http-equiv="refresh" content="0; url={{$link}}" />
	</head>
{{ end }}
